<?php

use think\facade\Route;

//文章
Route::group('article',function () {
    $prefix = 'article';
    //列表
    Route::group('list', function () {
        Route::post('type_list', 'TypeList'); //类型列表
        Route::post('index', 'index'); //列表
        Route::post('info', 'info'); //文章详情-开始阅读
        Route::post('collect', 'collect'); //文章收藏
        Route::post('cancel_collect', 'cancelCollect'); //文章取消收藏
    })->prefix($prefix.'.list.Index/');
});

//图片
Route::group('pic',function () {
    $prefix = 'pic';
    //列表
    Route::group('list', function () {
        Route::post('type_list', 'TypeList'); //类型列表
        Route::post('index', 'index'); //列表
    })->prefix($prefix.'.list.Index/');
});

//音乐
Route::group('music',function () {
    $prefix = 'music';
    //列表
    Route::group('list', function () {
        Route::post('type_list', 'TypeList'); //类型列表
        Route::post('index', 'index'); //列表
    })->prefix($prefix.'.list.Index/');
});

//视频
Route::group('video',function () {
    $prefix = 'video';
    //列表
    Route::group('list', function () {
        Route::post('type_list', 'TypeList'); //类型列表
        Route::post('index', 'index'); //列表
    })->prefix($prefix.'.list.Index/');
});

//问卷系统
Route::group('questionnaire',function () {
    $prefix = 'questionnaire';
    //问卷测评任务
    Route::group('task', function () {
        Route::post('index', 'index'); //问卷测评任务
        Route::post('get_task_paper_name_list', 'getTaskPaperNameList'); //获取任务试卷名称列表
        Route::post('paper_info', 'paperInfo'); //问卷详情
        Route::post('get_task_paper_list', 'getTaskPaperList'); //获取任务试卷列表
        Route::post('get_task_paper_info', 'getTaskPaperInfo'); //获取任务试卷详情
        Route::post('submit_answer', 'submitAnswer'); //提交答案
    })->prefix($prefix.'.task.Index/');
    //答卷结果
    Route::group('result', function () {
        Route::post('index', 'index'); //答卷结果列表
        Route::post('info', 'info'); //答卷结果详情（左、中）
        Route::post('result_info', 'resultInfo'); //答卷结果详情（右）
        Route::post('task_result_del', 'taskResultDel'); //删除整个任务的报告
        Route::post('task_paper_result_del', 'taskPaperResultDel'); //删除任务单个问卷的全部报告
        Route::post('del', 'del'); //删除单份报告
        Route::post('mobile_log', 'mobileLog'); //问卷测评记录-手机
    })->prefix($prefix.'.result.Index/');
});

//团体活动
Route::group('group_activity',function () {
    $prefix = 'group_activity';
    //团体活动列表
    Route::group('list', function () {
        Route::post('index', 'index'); //活动报名列表
        Route::post('info', 'info'); //详情
        Route::post('sign_up', 'signUp'); //报名
        Route::post('submit_task_evaluation_results', 'submitTaskEvaluationResults'); //提交任务测评结果
    })->prefix($prefix.'.list.Index/');
    //团体活动列表
    Route::group('log', function () {
        Route::post('index', 'index'); //参与记录
        Route::post('del', 'del'); //删除记录
        Route::post('info', 'info'); //详情
        Route::post('sign', 'sign'); //签到
        Route::post('ask_for_leave', 'askForLeave'); //请假
        Route::post('comment', 'comment'); //评论
    })->prefix($prefix.'.log.Index/');
});

//心灵智慧树
Route::group('tree',function () {
    $prefix = 'tree';
    //收取智慧果
    Route::group('collect', function () {
        Route::post('index', 'index'); //随机收取
        Route::post('like', 'like'); //点赞
        Route::post('comment', 'comment'); //评论
        Route::post('add', 'add'); //智慧果添加
    })->prefix($prefix.'.collect.Index/');
    //选项设置
    Route::group('config_info', function () {
        Route::post('index', 'index'); //智慧果收发设置-信息
        Route::post('update', 'update'); //智慧果收发设置-保存
    })->prefix($prefix.'.config.Info/');
    //收投记录
    Route::group('log', function () {
        Route::post('user_info', 'userInfo'); //我在智慧树上的个人信息
        Route::post('collect_list', 'collectList'); //我收取的智慧果
        Route::post('info', 'info'); //智慧果-查看
        Route::post('del', 'del'); //删除收取记录
        Route::post('send_list', 'sendList'); //我投递的智慧果
        Route::post('fruit_info', 'FruitInfo'); //果实详情
        Route::post('comment_status', 'commentStatus'); //是否开启评论
        Route::post('fruit_del', 'FruitDel'); //删除果实
        Route::post('real_name_status', 'realNameStatus'); //审核是否同意实名
    })->prefix($prefix.'.log.Index/');
});


//心理学堂
Route::group('school',function () {
    $prefix = 'school';
    //收取智慧果
    Route::group('course', function () {
        Route::post('index', 'index'); //课程列表
        Route::post('hot', 'hot'); //热门课程
        Route::post('hot2', 'hot2'); //热门课程-手机端
        Route::post('info', 'info'); //学习课件
        Route::post('collect', 'collect'); //收藏
        Route::post('comment_list', 'commentList'); //评论列表
        Route::post('send_comment', 'sendComment'); //发送评论
        Route::post('save_learning', 'saveLearning'); //保存心得
        Route::post('submit_evaluation_task', 'SubmitEvaluationTask'); //提交测评任务
        Route::post('report_info', 'reportInfo'); //结果详情
        Route::post('report_info2', 'reportInfo2'); //结果详情
        Route::post('chapter_info', 'chapterInfo'); //章节详情
    })->prefix($prefix.'.course.Index/');
});


//培训讲座
Route::group('training',function () {
    $prefix = 'training';
    //培训讲座列表
    Route::group('list', function () {
        Route::post('index', 'index'); //培训讲座列表
        Route::post('info', 'info'); //详情
        Route::post('result_info', 'resultInfo'); //测评结果
        Route::post('result_info2', 'resultInfo2'); //测评结果2
        Route::post('submit_task_evaluation_results', 'submitTaskEvaluationResults'); //提交测评
        Route::post('sign_up', 'signUp'); //报名
    })->prefix($prefix.'.list.Index/');
    //报名记录
    Route::group('log', function () {
        Route::post('index', 'index'); //报名记录
        Route::post('info', 'info'); //详情
        Route::post('update', 'update'); //更新内容
        Route::post('ask_for_leave', 'askForLeave'); //请假
    })->prefix($prefix.'.log.Index/');
});

//物联
Route::group('iot',function () {
    $prefix = 'iot';
    //功能室预约
    Route::group('reservation', function () {
        Route::post('room', 'room'); //功能室
        Route::post('date_view', 'dateView'); //当天可预约时段
        Route::post('submit', 'submit'); //提交预约
        Route::post('log', 'log'); //预约记录
        Route::post('log_info', 'logInfo'); //记录详情
        Route::post('delete_log', 'deleteLog'); //删除记录
        Route::post('cancel', 'cancel'); //取消预约
    })->prefix($prefix.'.reservation.Index/');
});

//职业规划
Route::group('metier',function () {
    $prefix = 'metier';
    //分享
    Route::group('share', function () {
        Route::post('list', 'list'); //列表
        Route::post('info', 'info'); //详情
    })->prefix($prefix.'.share.Index/');
    //名录
    Route::group('directory', function () {
        Route::post('list', 'list'); //列表
        Route::post('info', 'info'); //详情
    })->prefix($prefix.'.directory.Index/');
    //名录
    Route::group('evaluation', function () {
        Route::post('list', 'list'); //列表
        Route::post('info', 'info'); //详情
        Route::post('get_result', 'getResult'); //提交结果
        Route::post('result_info', 'resultInfo'); //结果详情
    })->prefix($prefix.'.evaluation.Index/');
});


